#include "controlDevice.h"
#include <stdlib.h>
#include <stdio.h>
upstairLightOpen(int pinNum)
{
  digitalWrite(pinNum, LOW);
};

upstairLightClose(int pinNum)
{
  digitalWrite(pinNum, HIGH);
};
upstairLightInit(int pinNum)
{

  pinMode(pinNum, OUTPUT);
  digitalWrite(pinNum, HIGH);
};
upstairLightStaus(int staus){

};
struct Devices upstairLight = {
    .devicesName = "upstairLight",
    .pinNum = 1,
    .open = upstairLightOpen,
    .close = upstairLightClose,
    .deviceInit = upstairLightInit,
    .changeStaus = upstairLightStaus

};
struct Devices *addupstairLightToDeviceLink(struct Devices *pthead)
{
  if (pthead == NULL)
  {
    return &upstairLight;
  }
  else
  {

    upstairLight.next = pthead;
    pthead = &upstairLight;
    return pthead;
  }
}
